package cn.edu.ctbu.simplescoremanagementsystem.exception;

import cn.edu.ctbu.simplescoremanagementsystem.constain.ResultEnum;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
public class ResultException extends RuntimeException {
    private Integer code;
    public ResultException(Integer code, String msg){
        super(msg);
        this.code = code;
    }

    public ResultException(ResultEnum resultEnum){
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }
}
